<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>

<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="keywords" content="Dojo, javascript, integration, browser detection, user agent, fubar_perl" />
<meta name="description" content="Browser detection using a simple javascript program and Dojo integration!" />
<meta name="MSSmartTagsPreventParsing" content="true" />
<meta name="distribution" content="Global" />
<meta name="author" content="Dwight Vietzke" />
<meta http-equiv="Reply-to" content="dwight_vietzke@yahoo.com" />
<meta name="classification" content="mobile internet website software" />
<meta name="copyright" content="Copyright©2008-2009 - OpenSiteMobile" />

	<title>Browser Detection</title>

<script type="text/javascript" charset='utf-8' src="./msos/dojo_config.js"></script>
<script type="text/javascript" charset='utf-8' src="./dojo/dojo.js"></script>

<script type='text/javascript'>
/* <![CDATA[ */

dojo.require("msos.common");

var browser_detect = function() {
    var answer = 'no response';
    var editable = msos.common.browser_editable();
    var current = msos.common.browser_current();
    var uagent = navigator.userAgent;
    var output = '';

    output  = '<h2>Dojo v' + dojo.version + '<\/h2>';
    output += '<h2>Your Browser Agent:<\/h2>';
    output += '<h3>'  + uagent +    '<\/h3><hr />';
    output += '<div class="list_small"><ul>';

    if (dojo.isBrowser)		{ answer = 'true';	}
    else			{ answer = 'false';	}
    output += '<li>Client is a browser : '   + answer + '<\/li>';

    if (current)		{ answer = 'true';	}
    else			{ answer = 'false';	}
    output += '<li>Browser is current : '    + answer + '<\/li>';

    if (editable)		{ answer = 'true';	}
    else			{ answer = 'false';	}
    output += '<li>Browser is editable : '  + answer + '<\/li>';

    output += '<li>Dojo Language : ' + dojo.locale + '<\/li>';

    if (dojo.isFF)		{ answer = 'Ver. ' + dojo.isFF;  }
    else			{ answer = 'false';	}
    output += '<li>Browser is FF : '    + answer + '<\/li>';

    if (dojo.isIE)	        { answer = 'Ver. ' + dojo.isIE;  }
    else			{ answer = 'false';	}
    output += '<li>Browser is MSIE : '	+ answer + '<\/li>';

    if (dojo.isOpera)           { answer = 'Ver. ' + dojo.isOpera; }
    else			{ answer = 'false';	}
    output += '<li>Browser is Opera : '	+ answer + '<\/li>';

    if (dojo.isKhtml)	        { answer = 'Ver. ' + dojo.isKhtml; }
    else			{ answer = 'false';	}
    output += '<li>Browser is KHTML : '     + answer + '<\/li>';

    if (dojo.isSafari)	        { answer = 'Ver. ' + dojo.isSafari; }
    else			{ answer = 'false';	}
    output += '<li>Browser is Safari : '    + answer + '<\/li>';

    if (dojo.isMozilla)         { answer = 'Ver. ' + dojo.isMozilla; }
    else			{ answer = 'false';	}
    output += '<li>Browser is Mozilla : '   + answer + '<\/li>';

    if (dojo.isQuirks)          { answer = 'true';	}
    else                        { answer = 'false';	}
    output += '<li>Quirks mode : '          + answer + '<\/li>';

    if (dojo.isAIR)             { answer = 'true';	}
    else                        { answer = 'false';	}
    output += '<li>Adobe Air : '             + answer + '<\/li>';

    if (dojo.isGears)           { answer = 'true';	}
    else                        { answer = 'false';	}
    output += '<li>Google Gears : '          + answer + '<\/li>';
    output += '<\/ul><\/div>';

    var browser = dojo.byId('browser_detection');
    browser.innerHTML = output;
}

dojo.addOnLoad(browser_detect);

/* ]]> */
</script>

<link rel='stylesheet' type='text/css' charset='utf-8' href="./msos/style/fubar.css" media='screen, handheld' />
<link rel='shortcut icon' href='./msos/images/osm.ico' />

</head>
<body>

<div id='body'>

<div class='marquee'>
    <img id='osm_logo_small' src='./msos/images/osm_logo_sml.jpg' class='marquee_img' alt="OpenSiteMobile" />
</div>

<div class='header'>
<a href='javascript: history.go(-1);' title='Return to the previous page'> Back </a>::
<a href='./index.html' title='Back to index page'> Home </a>
</div>

<h1>Browser Detection</h1>

<p>This page provides simple feedback via JavaScript and the Dojo toolkit about what
   web browser you are using.</p>

<div id='browser_detection' class='contrast1'><span class='alert'>Browser not detected!</span></div>

<h2>Reference: <a href='./msos/common.js'>msos.common</a></h2>

<div class='list_small'>
<ul>
    <li>browser_current()</li>
    <li>browser_editable()</li>
</ul>
</div>

<noscript>
<h2><span class='alert'>Your browser&#39;s JavaScript compiler is turned off or isn&#39;t available.</span></h2>

<p>You will need to enable JavaScript in your browser before browser detection will function properly!</p>
</noscript>

<h3 title='Testing utf-8 encoded characters'>Iñtërnâtiônàlizætiøn</h3>

<div class='footer'>
<a href='javascript: history.go(-1);' title='Return to the previous page'> Back </a>::
<a href='./index.html' title='Back to index page'> Home </a>
</div>

<div id='copyright'>
<span class='no_br'>Powered by:
   <a href='http://www.opensitemobile.com'>
  <span class='bold_text' title="Copyright©2008-2009 OpenSiteMobile - All rights reserved">MobileSiteOS</span></a>™</span>
</div>

</div> <!-- end 'body' div -->

</body>
</html>
